package es.uned.hoomgle.web.actions;

import java.util.Map;

import javax.annotation.Resource;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.util.ValueStack;

import es.uned.hoomgle.core.services.interfaces.HomeServiceI;
import es.uned.hoomgle.hibernate.beans.interfaces.HomeI;

public class HomeDetailAction extends ActionSupport{

	@Resource
	private HomeServiceI homeService;
	
	public HomeI homeDetail;
	
	public Integer id;
	
	 /**
	  * @return the String "success" to do action
	 */
	public String getHome (){
		if(id!=null){
			homeDetail = homeService.getHomeById(id);
		}				
		return "success";
	
		
	}
	
	/**
	  * @return the String "pictureResult" to do action
	 */
	public String showPicture(){
		return "pictureResult";
	}

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the homeDetail
	 */
	public HomeI getHomeDetail() {
		return homeDetail;
	}

	/**
	 * @param homeDetail the homeDetail to set
	 */
	public void setHomeDetail(HomeI homeDetail) {
		this.homeDetail = homeDetail;
	}


	
	
	
	
	
}
